dreams are a combination of several things.
1. emotional hot spots in your memory system
these can be caused by --- unfinished business --- regrets ---fading memories bothering you for completion.
2. things happening around your body while you sleep being incorporated into the dream in progress....
example, I once dreamt of a man laughing his butt off for no reason... when I woke up there was a dog barkin in the distance which sounded a bit like the man's laughter.
3. the twilight zone, there may be hidden data channels in the what if along which may be accessible during dreams...who knows? but I have met dream entities which are just as real as those I meet here and now....some have lied to me, some have played games on me, all of them have violated my expectations.
Dreams often move by associative steps besides cause and effect... meaning that a word or idea links to another and another and that is why what seems bizzarre after waking seemed perfectly normal while dreaming.
I once walked into a bank in a dream...the bank doors looked like supermarket doors and so I found myself in a check out line in the grocery store, I looked up and saw pipes running along the wall which reminded my of a factory and when I looked down, I was in a factory...etc